<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="IndexUsuario.xhtml">
	<ui:define name="conteudo">
		<f:loadBundle basename="br.ucb.jogo.recursos.messages" var="msg" />
		<p:panel styleClass="FundoPaginaUsuario" >
			<h:form id="form">
				<br/><br/><br/>
				<center>  
				    <p:dataTable emptyMessage="#{msg.NENHUM_PERSONAGEM}" 
				    			 var="personagem" value="#{dueloManagedBean.personagensDuelo}" 
				    			 rowKey="#{personagem.nick}" paginator="true" rows="10" 
				    			 filteredValue="#{personagemManagedBean.filtroPersonagens}" 
				    			 id="TablePersonagens" styleClass="PainelTrabalho">  
				  
				        <f:facet name="header">  
				        	<h:outputText value="#{msg.LISTAR_PERSONAGEM}"/>  
				        </f:facet>  
				  
				        <p:column headerText="#{msg.NICK}" sortBy="#{personagem.nick}" filterBy="#{personagem.nick}" id="nick">  
				            <h:outputText value="#{personagem.nick}"/>
				        </p:column>
				        
				        <p:column headerText="#{msg.CLASSE}" sortBy="#{personagem.classe.nome}" filterBy="#{personagem.classe.nome}" id="classe">  
				            <h:outputText value="#{personagem.classe.nome}"/>
				        </p:column>
				        
				  		<p:column headerText="#{msg.SELECIONAR}" id="selecionar">
				  			<h:commandLink action="#{dueloManagedBean.saveDuelo}">
					  			<f:setPropertyActionListener target="#{dueloManagedBean.personagem}" value="#{personagem}"/>
					  			<h:graphicImage url="/imagens/select.png" title="Selecionar" alt="Selecionar"/>
				  			</h:commandLink>
				        </p:column>
				        
				    </p:dataTable>  
				</center>  
			</h:form>
		</p:panel>
	</ui:define>
</ui:composition>
</html>
